﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/MasterPage.master" AutoEventWireup="true"
    CodeFile="CommInsurance.aspx.cs" Inherits="Employees_CommInsurance" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Titile" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="Content" runat="Server">
    <div>
        <infolight:webdatasource id="Master" runat="server" autoapply="True" webdatasetid="WMaster"
            datamember="CommInsurance">
        </infolight:webdatasource>
        <infolight:webnavigator id="WebNavigator1" runat="server" bindingobject="wgvMaster"
            width="100%" statusstrip="WebStatusStrip1" 
            CssClass="NavigatorBar" CtlHeight="25" ShowDataStyle="GridStyle">
            <navcontrols>
                 <InfoLight:ControlItem ControlName="First" ControlText="掸" ControlType="Image" ControlVisible="True"
                    ImageUrl="../image/uipics/first_C.gif" MouseOverImageUrl="../image/uipics/first2_C.gif"
                    Size="48" DisenableImageUrl="../image/uipics/first3_C.gif" />
                <InfoLight:ControlItem ControlName="Previous" ControlText="掸" ControlType="Image" ControlVisible="True"
                    ImageUrl="../image/uipics/previous_C.gif" MouseOverImageUrl="../image/uipics/previous2_C.gif"
                    Size="48" DisenableImageUrl="../image/uipics/previous3_C.gif" />
                <InfoLight:ControlItem ControlName="Next" ControlText="掸" ControlType="Image" ControlVisible="True"
                    ImageUrl="../image/uipics/next_C.gif" MouseOverImageUrl="../image/uipics/next2_C.gif"
                    Size="48" DisenableImageUrl="../image/uipics/next3_C.gif" />
                <InfoLight:ControlItem ControlName="Last" ControlText="ソ掸" ControlType="Image" ControlVisible="True"
                    ImageUrl="../image/uipics/last_C.gif" MouseOverImageUrl="../image/uipics/last2_C.gif"
                    Size="48" DisenableImageUrl="../image/uipics/last3_C.gif" />
                <InfoLight:ControlItem ControlName="Add" ControlText="穝糤" ControlType="Image" ControlVisible="True"
                    ImageUrl="../image/uipics/add_C.gif" MouseOverImageUrl="../image/uipics/add2_C.gif"
                    Size="48" DisenableImageUrl="../image/uipics/add3_C.gif" />
                <InfoLight:ControlItem ControlName="Apply" ControlText="郎" ControlType="Image" ControlVisible="True"
                    ImageUrl="../image/uipics/apply_C.gif" MouseOverImageUrl="../image/uipics/apply2_C.gif"
                    Size="48" DisenableImageUrl="../image/uipics/apply3_C.gif" />
                <InfoLight:ControlItem ControlName="Abort" ControlText="斌" ControlType="Image" ControlVisible="False"
                    ImageUrl="../image/uipics/abort_C.gif" MouseOverImageUrl="../image/uipics/abort2_C.gif"
                    Size="48" DisenableImageUrl="../image/uipics/abort3_C.gif" />
                <InfoLight:ControlItem ControlName="Query" ControlText="琩高" ControlType="Image" ControlVisible="False"
                    ImageUrl="../image/uipics/query_C.gif" MouseOverImageUrl="../image/uipics/query2_C.gif"
                    Size="48" DisenableImageUrl="../image/uipics/query3_C.gif" />
                <InfoLight:ControlItem ControlName="Print" ControlText="ゴ" ControlType="Image" ControlVisible="False"
                    ImageUrl="../image/uipics/print_C.gif" MouseOverImageUrl="../image/uipics/print2_C.gif"
                    Size="48" DisenableImageUrl="../image/uipics/print3_C.gif" />
                <InfoLight:ControlItem ControlName="Export" ControlType="Image" ControlVisible="False"
                    DisenableImageUrl="../Image/UIPics/Export3_C.gif" ImageUrl="../Image/UIPics/Export_C.gif"
                    MouseOverImageUrl="../Image/UIPics/Export2_C.gif" Size="48" />
            </navcontrols>
            <navstates>
                <InfoLight:WebNavigatorStateItem StateText="Initial" />
                <InfoLight:WebNavigatorStateItem StateText="Browsed" />
                <InfoLight:WebNavigatorStateItem StateText="Inserting" />
                <InfoLight:WebNavigatorStateItem StateText="Editing" />
                <InfoLight:WebNavigatorStateItem StateText="Applying" />
                <InfoLight:WebNavigatorStateItem StateText="Changing" />
                <InfoLight:WebNavigatorStateItem StateText="Querying" />
                <InfoLight:WebNavigatorStateItem StateText="Printing" />
            </navstates>
        </infolight:webnavigator>
    </div>
    <infolight:webgridview id="wgvMaster" runat="server" datasourceid="Master" width="100%"
        aborticonurl="../Image/UIPics/Abort.gif" addiconurl="../Image/UIPics/Add.gif"
        applyiconurl="../Image/UIPics/Apply.gif" canceliconurl="../Image/UIPics/Cancel.gif"
        mouseoveraborticonurl="../Image/UIPics/Abort2.gif" mouseoveraddiconurl="../Image/UIPics/Add2.gif"
        mouseoverapplyiconurl="../Image/UIPics/Apply2.gif" mouseovercanceliconurl="../Image/UIPics/Cancel2.gif"
        mouseoverokiconurl="../Image/UIPics/OK2.gif" mouseoverqueryiconurl="../Image/UIPics/Query2.gif"
        okiconurl="../Image/UIPics/OK.gif" queryiconurl="../Image/UIPics/Query.gif" headerstylewrap="False"
        cellpadding="5">
        <navcontrols>
<InfoLight:ControlItem ControlVisible="False" Size="25" 
                    MouseOverImageUrl="../image/uipics/add2.gif" ControlText="add" 
                    ControlName="Add" ControlType="Image" ImageUrl="../image/uipics/add.gif"></InfoLight:ControlItem>
<InfoLight:ControlItem ControlVisible="False" Size="25" 
                    MouseOverImageUrl="../image/uipics/ok2.gif" ControlText="Insert" 
                    ControlName="OK" ControlType="Image" ImageUrl="../image/uipics/ok.gif"></InfoLight:ControlItem>
<InfoLight:ControlItem ControlVisible="False" Size="25" 
                    MouseOverImageUrl="../image/uipics/cancel2.gif" ControlText="cancel" 
                    ControlName="Cancel" ControlType="Image" ImageUrl="../image/uipics/cancel.gif"></InfoLight:ControlItem>
</navcontrols>
        <columns>
<asp:TemplateField ShowHeader="False"><EditItemTemplate>
<asp:ImageButton id="ImageButton1" runat="server" Text="Update" CausesValidation="True" ImageUrl="~/Image/UIPics/OK.gif" CommandName="Update" __designer:wfdid="w3"></asp:ImageButton>&nbsp;<asp:ImageButton id="ImageButton2" runat="server" Text="Cancel" CausesValidation="False" ImageUrl="~/Image/UIPics/Cancel.gif" CommandName="Cancel" __designer:wfdid="w4"></asp:ImageButton>
</EditItemTemplate>
    <headerstyle wrap="False" />
<ItemTemplate>
<asp:ImageButton id="ImageButton3" runat="server" Text="Edit" CausesValidation="False" ImageUrl="~/Image/UIPics/Edit.gif" CommandName="Edit" __designer:wfdid="w1"></asp:ImageButton>&nbsp;<asp:ImageButton id="ImageButton4" runat="server" Text="Delete" CausesValidation="False" ImageUrl="~/Image/UIPics/Delete.gif" CommandName="Delete" __designer:wfdid="w2"></asp:ImageButton>
</ItemTemplate>
</asp:TemplateField>
                <asp:BoundField DataField="InsuranceId" HeaderText="名称编号" 
                    SortExpression="InsuranceId" ReadOnly="True" />
                <asp:BoundField DataField="InsuranceName" HeaderText="保险名称" 
                    SortExpression="InsuranceName" />
                <asp:BoundField DataField="CompName" HeaderText="保险公司" 
                    SortExpression="CompName" />
                <asp:TemplateField HeaderText="保险分类" SortExpression="InsuranceClass">
                    <EditItemTemplate>
                        <InfoLight:WebDropDownList ID="wddType" runat="server" 
                            AutoInsertEmptyData="False" DataSourceID="wdsType" DataTextField="TypeName" 
                            DataValueField="TypeId" DriverObject="" Filter="" FilterObject="" 
                            onlyshowselecttext="False" SelectedValue='<%# Bind("InsuranceClass") %>'>
                        </InfoLight:WebDropDownList>
                    </EditItemTemplate>
                    <FooterTemplate>
                        <InfoLight:WebDropDownList ID="wddType" runat="server" 
                            AutoInsertEmptyData="False" DataSourceID="wdsType" DataTextField="TypeName" 
                            DataValueField="TypeId" DriverObject="" Filter="" FilterObject="" 
                            onlyshowselecttext="False" SelectedValue='<%# Bind("InsuranceClass") %>'>
                        </InfoLight:WebDropDownList>
                    </FooterTemplate>
                    <ItemTemplate>
                        <InfoLight:WebDropDownList ID="wddType" runat="server" 
                            AutoInsertEmptyData="False" DataSourceID="wdsType" DataTextField="TypeName" 
                            DataValueField="TypeId" DriverObject="" Filter="" FilterObject="" 
                            onlyshowselecttext="True" SelectedValue='<%# Bind("InsuranceClass") %>'>
                        </InfoLight:WebDropDownList>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="投保开始" SortExpression="StartDate">
                    <EditItemTemplate>
                        <InfoLight:WebDateTimePicker ID="wdtCommInsuranceStartDateE" runat="server" 
                            DateFormat="None" DateTimeType="DateTime" Localize="False" MaxYear="2050" 
                            MinYear="1950" Text='<%# Bind("StartDate") %>' ToolTip="StartDate" 
                            UseButtonImage="True" Width="100px"></InfoLight:WebDateTimePicker>
                    </EditItemTemplate>
                    <FooterTemplate>
                        <InfoLight:WebDateTimePicker ID="wdtCommInsuranceStartDateF" runat="server" 
                            DateFormat="None" DateTimeType="DateTime" Localize="False" MaxYear="2050" 
                            MinYear="1950" ToolTip="StartDate" UseButtonImage="True" Width="100px"></InfoLight:WebDateTimePicker>
                    </FooterTemplate>
                    <ItemTemplate>
                        <asp:Label ID="lCommInsuranceStartDate" runat="server" 
                            Text='<%# Bind("StartDate", "{0:d}") %>' ToolTip="StartDate"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="投保结束" SortExpression="EndDate">
                    <EditItemTemplate>
                        <InfoLight:WebDateTimePicker ID="wdtCommInsuranceEndDateE" runat="server" 
                            DateFormat="None" DateTimeType="DateTime" Localize="False" MaxYear="2050" 
                            MinYear="1950" Text='<%# Bind("EndDate") %>' ToolTip="EndDate" 
                            UseButtonImage="True" Width="100px"></InfoLight:WebDateTimePicker>
                    </EditItemTemplate>
                    <FooterTemplate>
                        <InfoLight:WebDateTimePicker ID="wdtCommInsuranceEndDateF" runat="server" 
                            DateFormat="None" DateTimeType="DateTime" Localize="False" MaxYear="2050" 
                            MinYear="1950" ToolTip="EndDate" UseButtonImage="True" Width="100px"></InfoLight:WebDateTimePicker>
                    </FooterTemplate>
                    <ItemTemplate>
                        <asp:Label ID="lCommInsuranceEndDate" runat="server" 
                            Text='<%# Bind("EndDate", "{0:d}") %>' ToolTip="EndDate"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="InsuranceRating" HeaderText="保额" 
                    SortExpression="InsuranceRating" />
                <asp:BoundField DataField="InsuranceFee" HeaderText="保费" 
                    SortExpression="InsuranceFee" />
</columns>
        <rowstyle horizontalalign="Center"></rowstyle>
        <pagersettings mode="NumericFirstLast" />
        <footerstyle backcolor="#507CD1" forecolor="White" font-bold="True"></footerstyle>
        <rowstyle backcolor="#EFF3FB"></rowstyle>
        <editrowstyle backcolor="#2461BF"></editrowstyle>
        <selectedrowstyle backcolor="#D1DDF1" forecolor="#333333" font-bold="True"></selectedrowstyle>
        <pagerstyle backcolor="LightBlue" forecolor="White" horizontalalign="Center"></pagerstyle>
        <headerstyle backcolor="DeepSkyBlue" forecolor="White" font-bold="True"></headerstyle>
        <alternatingrowstyle backcolor="White" bordercolor="White"></alternatingrowstyle>
        <addnewrowcontrols>
                <InfoLight:AddNewRowControlItem ControlID="wddType" ControlType="DropDownList" 
                    FieldName="InsuranceClass" />
                <InfoLight:AddNewRowControlItem ControlID="wdtCommInsuranceStartDateF" 
                    ControlType="DateTimePicker" FieldName="StartDate" />
                <InfoLight:AddNewRowControlItem ControlID="wdtCommInsuranceEndDateF" 
                    ControlType="DateTimePicker" FieldName="EndDate" />
            </addnewrowcontrols>
        <alternatingrowstyle backcolor="White" bordercolor="White"></alternatingrowstyle>
    </infolight:webgridview>
    <infolight:webdefault id="wdCommInsurance" runat="server" defaultactive="True" datasourceid="Master"
        datamember="CommInsurance" carryonactive="False">
        <fields>
            <InfoLight:DefaultFieldItem DefaultValue="0" FieldName="InsuranceId"></InfoLight:DefaultFieldItem>
            <InfoLight:DefaultFieldItem DefaultValue="0" FieldName="InsuranceRating"></InfoLight:DefaultFieldItem>
            <InfoLight:DefaultFieldItem DefaultValue="0" FieldName="InsuranceFee"></InfoLight:DefaultFieldItem>
        </fields>
    </infolight:webdefault>
    <infolight:webvalidate id="wvCommInsurance" runat="server" datasourceid="Master"
        datamember="CommInsurance" rowcss="" altrowcss="" forecolor="Red">
        <fields>
        <InfoLight:ValidateFieldItem CheckNull="True" FieldName="InsuranceName"></InfoLight:ValidateFieldItem>
        <InfoLight:ValidateFieldItem CheckNull="True" FieldName="CompName"></InfoLight:ValidateFieldItem>
        <InfoLight:ValidateFieldItem CheckNull="True" FieldName="StartDate"></InfoLight:ValidateFieldItem>
        <InfoLight:ValidateFieldItem CheckNull="True" FieldName="EndDate"></InfoLight:ValidateFieldItem>
    </fields>
    </infolight:webvalidate>
    <infolight:webdatasource id="wdsType" runat="server" selectalias="Usasdb" selectcommand="select InsuranceType.TypeId,InsuranceType.TypeName from InsuranceType where TypeStatus=1">
    </infolight:webdatasource>
</asp:Content>
